function co = fixundGen(ci)
if isa(ci,'cell')
    co = cellfun(@fixund,ci,'UniformOutput',false);
else
    co = fixund(ci);
end
end

function so = fixund(si)
if isempty(si)
    so = '';
else
    spl = strsplit(si, '_');
    for idx = 2:numel(spl)
        spl{idx} = ['{' spl{idx} '}'];
    end
    so = strjoin(spl, '_');
end
end
